﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JsonModel
{
    public struct Badge
    {
        public string Text;
        public string Color;
    }

    public class OnlineData
    {
        public string UserId { get; set; }
        public int Id { get; set; }
        public int Level { get; set; }
        public int Mvp { get; set; }
        public int Experience { get; set; }
        public int Points { get; set; }
        public string RoleName { get; set; }
        public string RoleColorHex { get; set; }
        public bool Muted { get; set; }
        public bool IcomMuted { get; set; }
    }

    public class PlayerData
    {
        public string Nickname { get; set; }
        public string UserId { get; set; }
        public int Level { get; set; }
        public int Mvp { get; set; }
        public int Experience { get; set; }
        public int MaxExperience { get; set; }
        public int Points { get; set; }
        public Badge? DonatorBadge { get; set; }
        public Badge[] SpecialBadges { get; set; }
        public DateTime LastLogin { get; set; }
        public DateTime? Reservation { get; set; }
        public DateTime? RainbowBadge { get; set; }
        public KeyValuePair<string, DateTime>? MvpMusic { get; set; }
        public KeyValuePair<string, DateTime>? JoinMessage { get; set; }
        public OnlineData OnlineData { get; set; }
    }

    public class ServerData
    {
        public int Players { get; set; }
        public int MaxPlayers { get; set; }
        public int RoundTime { get; set; }
        public int OnlineAdmin { get; set; }
    }

    public class ExecutionResponse
    {
        public bool Success { get; set; }
        public Dictionary<string, object> Response { get; set; } = new Dictionary<string, object>();
    }

    public class ExecutionRequest
    {
        public Request Request { get; set; }
        public Dictionary<string, object> Parameters { get; set; } = new Dictionary<string, object>();
    }

    public enum Request : byte
    {
        SignIn = 0,
        PlayerInformation = 1,
        AccountBindRequest = 2,
        CommandExecute = 3,
        PlayerList = 4,
        Ban = 5,
        StatusQuery = 6,
        Mute = 7,
        Unmute = 8,
        Unban = 9
    }
}